home *** CD-ROM | disk | FTP | other *** search
/ Super League / Super League.iso / TUTORIAL / CURSO / INTRO.DXR / 00113.ls < prev    next >
Encoding:
Text File  |  1997-03-25  |  1.3 KB  |  47 lines

  1. on startMovie
  2.   global bookmarkPath, tipomaquina
  3.   clearGlobals()
  4.   set tipomaquina to the machineType
  5.   bookm()
  6. end
  7.  
  8. on bookm
  9.   global tipomaquina, bookmarkPath, buscaocrea
  10.   if tipomaquina = 256 then
  11.     openXLib("../curso/WinDir.dll")
  12.     set utilObj to WinDir(mnew)
  13.     set WinPath to utilObj(mWinDir)
  14.     utilObj(mdispose)
  15.     closeXLib("../curso/WinDir.dll")
  16.     set bookmarkPath to WinPath & "\" & "bookm.txt"
  17.     openXLib("../curso/FileIO.dll")
  18.     set buscaocrea to fileio(mnew, "read", bookmarkPath)
  19.     if buscaocrea = -43 then
  20.       set escribelist to fileio(mnew, "write", bookmarkPath)
  21.       escribelist(mWriteChar, 48)
  22.       escribelist(mdispose)
  23.     end if
  24.     closeXLib("../curso/FileIO.dll")
  25.   else
  26.     openXLib("MovieUtilities.XObj")
  27.     if objectp(utilObj) then
  28.       utilObj(mdispose)
  29.     end if
  30.     set utilObj to MovieUtilities(mnew)
  31.     set result to value(utilObj)
  32.     if result < 0 then
  33.       alert("Error" && result && "occurri├│ cuando intentando a crear el objecto.")
  34.       exit
  35.     end if
  36.     set bookmarkPath to utilObj(mGetSystemPath) & "bookm.txt"
  37.     utilObj(mdispose)
  38.     closeXLib("MovieUtilities.XObj")
  39.     set buscaocrea to fileio(mnew, "read", bookmarkPath)
  40.     if buscaocrea < 0 then
  41.       set escribelist to fileio(mnew, "write", bookmarkPath)
  42.       escribelist(mWriteChar, "0")
  43.       escribelist(mdispose)
  44.     end if
  45.   end if
  46. end
  47.